#ifndef __BULLET_MANAGER_H__
#define __BULLET_MANAGER_H__

#include "cocos2d.h"
#include "Bullet.h"

using namespace cocos2d;

class BulletManager
{
public:
	BulletManager(cocos2d::CCLayer* layer);
	~BulletManager(void);
	
	void shoot(Creature* creature, float angle);
	void checkCollision();

private:
	void checkCollisionEnemy(CCArray *collidedBullets, Bullet *bullet);
	void checkCollisionField(CCArray *collidedBullets, Bullet *bullet);
	void checkCreaturesHit(CCArray *collidedBullets, Bullet *bullet, CCArray *creatures);

	CCArray* d_enemyBullets;
	CCArray* d_playerBullets;
	CCLayer* d_layer;
	CCRect d_field;

};

#endif // __BULLET_MANAGER_H__

